/// @function sai_scrViewNew(noone, sai_oView)
/// @description 在parent下生成object控件
/// @param parent 父view
/// @param object 
/// @param x 相对parent的坐标
/// @param y 相对parent的坐标
/// @return new_view

//argument0 父view argument1 view_type
var parent = argument[0];
var class = argument[1];

var xx = argument[2];
var yy = argument[3];

//创建view
var dep = 0;
if(parent!=noone)
	dep = parent.depth;
var view = instance_create_depth(xx, yy, dep, class);

//组合父子关系
if(parent!=noone)
{
	view.x = parent.x+xx;
	view.y = parent.y+yy;
	ds_list_add(parent.view_child_list, view.id);
}
view.view_parent = parent;

show_debug_message("view new:"+string(parent)+"->"+string(view));
//返回view
return view;
